//package com.ag.answergames.controller;
//
//
//import com.ag.answergames.service.wallet.AdultBalanceService;
//import com.ag.answergames.vo.AdultAccountVO;
//import com.ag.answergames.vo.common.Result;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.HttpRequest;
//import org.springframework.web.bind.annotation.*;
//
//import javax.servlet.http.HttpServletRequest;
//
///**
// * @author: aoaowu
// * @description: 家长账户余额相关的controller
// * @date: 2023/04/17 11:29
// */
//@RestController
//@RequestMapping("/back/adult")
//@Api(value = "adult", description = "家长账户的相关api操作")
//public class AdultBalanceController {
//
//    @Autowired
//    PayController payController;
//
//    @Autowired
//    AdultBalanceService adultBalanceService;
//
//    @PostMapping(value = "find/balance")
//    @ApiOperation(value = "查看家长钱包的余额")
//    public Result<AdultAccountVO> find(@RequestParam String openId) {
//        Result result = adultBalanceService.find(openId);
//        return result;
//    }
//
//    @PostMapping(value = "decrease/balance")
//    @ApiOperation(value = "家长钱包余额的减少（1:转移到小孩的账户上，2:退款）")
//    public Result<AdultAccountVO> decrease(@RequestParam Long money,@RequestParam String openId) {
//        Result decrease = adultBalanceService.decrease(money, openId);
//        return decrease;
//    }
//
//    @PostMapping(value = "update/balance")
//    @ApiOperation(value = "家长充值后余额的变化")
//    public Result<AdultAccountVO> update(@RequestParam Long money, @RequestParam String openId, @RequestParam String status) {
//        if (status.equals("SUCCESS")) {
//            Result result = adultBalanceService.topUp(money, openId);
//            return result;
//        }
//        if (status.equals("FAIL")) {
//            return Result.failed("充值失败");
//        } else {
//            return Result.validateFailed("请等待");
//        }
//    }
//
//
//}
